<%@page import="cn.com.entity.Consumer"%>
<%@page import="java.util.Iterator"%>
<%@page import="cn.com.entity.Doctor"%>
<%@page import="java.util.Set"%>
<%@page import="cn.com.entity.Departments"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<style type="text/css">		
a:visited {
	text-decoration: none;
	color: #03C;
}
a:hover {
	text-decoration: none;
	color: #69C;
}
a:active {
	text-decoration: none;
}
a:link {
	
	text-decoration: none;
}
body{
	color: #03C;
	font-size: 20px;
}

</style>

</head>
<body>
<%

 if(session.getAttribute("onedepartment")!=null){
	 Departments depart=(Departments)session.getAttribute("onedepartment");
	 if(session.getAttribute("consumerlogin")!=null){
	 Consumer c=(Consumer)session.getAttribute("consumerlogin");
%>
<form action="addregisterformaction" method="post" >
<h2 align="center">请选择医生</h2>
<table border="1" width="60%"  align="center">
	<tr>
		<td>科室名</td>
		<td>科室简介</td>
	</tr>
	
	<tr>
		<td>
		<input type="hidden" name="registerform.consumerid" value="<%=c.getConsumerid()%>" id="consumerid"/>
		<input type="hidden" name="registerform.departmentsid" value="<%=depart.getDepartmentsid()%>"/>
		<%=depart.getDepartmentsname() %></td>
		<td><%=depart.getDepartmentsprofile() %></td>
	</tr>
</table>
<br/>
<table border="1" width="80%"  align="center">
	<tr>
		<th colspan="6">科室所有医生</th>
	</tr>
	
	<tr>
		<td>医生姓名</td>
		<td>医生性别</td>
		<td>医生简介</td>
		<td>职称</td>
		<td>出诊时间</td>
		<td>选择</td>
	</tr>
<% 
	Set<Doctor> doctorset=depart.getDoctorset();
	Iterator<Doctor> it=doctorset.iterator();
	while(it.hasNext()){
		Doctor d=it.next();
	
%>	
	<tr>
		<td>
		<%=d.getDoctorrealname() %></td>
		<td><%=d.getDoctorsex() %></td>
		<td><%=d.getDoctorprofile() %></td>
		<td><%=d.getDoctordesignation() %></td>
		<td><%=d.getDoctorworktime() %></td>
		<td align="center"><input type="radio" name="registerform.doctorid" value="<%=d.getDoctorid() %>"/></td>
	</tr>
<%} %>	
	<tr><th colspan="6"><input type="submit"  style="font-size:20px; color:#FFF; background-image: url(images/lanseanniu.jpg);" value=" 保 存 " /></th></tr>
</table>
</form>
<%}else{
	out.print("您还没有登录，不能预约挂号，请您先登录");
	%>
	<br/><br/>
	<a href="consumerlogin.jsp">我要登陆</a>
<%
}
	 
 }%>
</body>
</html>